﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:MapGeometry="clr-namespace:DeepEarth.BingMapsToolkit.Client.MapGeometry"
    xmlns:Drawing="clr-namespace:DeepEarth.BingMapsToolkit.Client.MapGeometry.Drawing">

    <Style TargetType="MapGeometry:EnhancedMapPoint">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="MapGeometry:EnhancedMapPoint">
                    <Grid>
                        <Grid Canvas.ZIndex="1" Opacity="0.82" >
                            <Grid HorizontalAlignment="Center" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5">
                                <Grid.RenderTransform>
                                    <ScaleTransform x:Name="PART_LabelScaleTransform" ScaleX="1" ScaleY="1" />
                                </Grid.RenderTransform>
                                <Canvas x:Name="PART_LabelContainer" HorizontalAlignment="Center" VerticalAlignment="Center">
                                    <Border VerticalAlignment="Stretch" Background="#FF2D2D2D" CornerRadius="8,8,8,8" BorderBrush="#FF626262" BorderThickness="2,2,2,2" RenderTransformOrigin="0.5,0.5" Opacity="0.8">
                                        <TextBlock FontSize="25" Foreground="White" x:Name="PART_Label"></TextBlock>
                                    </Border>
                                </Canvas>
                            </Grid>
                            <Grid HorizontalAlignment="Center" VerticalAlignment="Center" x:Name="PART_Balloon" Visibility="Collapsed" RenderTransformOrigin="0.5,0.5">
                                <Grid.Resources>
                                    <Storyboard x:Name="PART_ShowBalloon">
                                        <DoubleAnimation Storyboard.TargetName="BalloonContent" Storyboard.TargetProperty="Opacity" From="0.25" To="1" Duration="0:0:0.4"/>
                                    </Storyboard>
                                </Grid.Resources>
                                <Grid.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform x:Name="PART_BalloonScaleTransform" ScaleX="1" ScaleY="1" />
                                        <TranslateTransform x:Name="PART_BallonTranslateTransform" X="0" Y="0" />
                                    </TransformGroup>
                                </Grid.RenderTransform>
                                <Canvas x:Name="BalloonContent">
                                    <Border VerticalAlignment="Stretch" Background="#FF2D2D2D" CornerRadius="8,8,8,8" BorderBrush="#FF626262" BorderThickness="2,2,2,2" ScrollViewer.HorizontalScrollBarVisibility="Visible" RenderTransformOrigin="0.5,0.5">
                                        <StackPanel x:Name="PART_BalloonContent" />
                                    </Border>
                                </Canvas>
                            </Grid>
                        </Grid>
                        <Grid HorizontalAlignment="Center" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5">
                            <Grid.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform x:Name="PART_ScaleTransform" ScaleX="1" ScaleY="1" />
                                    <TranslateTransform x:Name="PART_TranslateTransform" X="0" Y="0" />
                                </TransformGroup>
                            </Grid.RenderTransform>
                            <Image Width="100" x:Name="PART_Image"></Image>
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="Drawing:DrawPointStart">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Drawing:DrawPointStart">
                    <Grid VerticalAlignment="Center" HorizontalAlignment="Center" Width="16" Height="16" Cursor="Hand">
                        <Ellipse Fill="#FFFF0000" Stroke="#FF000000"/>
                        <Ellipse Fill="#FF000000" Stroke="#FF000000" VerticalAlignment="Center" HorizontalAlignment="Center" Width="8" Height="8"></Ellipse>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="Drawing:DrawPointMid">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Drawing:DrawPointMid">
                    <Grid VerticalAlignment="Center" HorizontalAlignment="Center" Width="10" Height="10" Cursor="Hand">
                        <Ellipse Fill="#770000FF" Stroke="#FF000000"/>
                        <Ellipse Fill="#77000000" Stroke="#FF000000" RenderTransformOrigin="0.5,0.5" VerticalAlignment="Center" HorizontalAlignment="Center" Width="5" Height="5">
                            <Ellipse.RenderTransform>
                                <TransformGroup>
                                    <TranslateTransform X="-0.5" Y="-0.5"/>
                                </TransformGroup>
                            </Ellipse.RenderTransform>
                        </Ellipse>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="Drawing:DrawPoint">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Drawing:DrawPoint">
                    <Grid VerticalAlignment="Center" HorizontalAlignment="Center" Width="10" Height="10" Cursor="Hand">
                        <Ellipse Fill="#FFFDFF00" Stroke="#FF000000"/>
                        <Ellipse Fill="#FF00FF00" Stroke="#FF000000" RenderTransformOrigin="0.5,0.5" VerticalAlignment="Center" HorizontalAlignment="Center" Width="5" Height="5">
                            <Ellipse.RenderTransform>
                                <TransformGroup>
                                    <TranslateTransform X="-0.5" Y="-0.5"/>
                                </TransformGroup>
                            </Ellipse.RenderTransform>
                        </Ellipse>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="Drawing:DrawPointCustom">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Drawing:DrawPointCustom">
                    <Grid Cursor="Hand">
                        <Grid HorizontalAlignment="Center" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5">
                            <Grid.RenderTransform>
                                <ScaleTransform x:Name="PART_ScaleTransform" ScaleX="1" ScaleY="1" />
                            </Grid.RenderTransform>
                            <Image Width="100" x:Name="PART_Image"></Image>
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>



</ResourceDictionary>

